import React,{ useState } from 'react';
import store from '../base/index'
import { useSelector, useDispatch } from'react-redux';
import {asnyncEdit} from "@/views/redux/module/contral.tsx";

const Base = () => {
    const name = useSelector(state => state.contral.name)
    const dispatch = useDispatch()
    const handleClick = () => {
        dispatch(asnyncEdit())
    }

    return (
        <>
            <pre>{name}</pre>
            <button onClick={handleClick}>Click me</button>
        </>
    );
};

export default Base;